/**
 * Created by Fiona on 2017/1/12.
 */
import wx from 'weixin-js-sdk'
export default{
	methods:{
		readImgInfo(){
			let imgs = [];
			let imgObj = document.getElementsByTagName("img");
			for(let i=0;i<imgObj.length;i++){
				imgs.push(imgObj[i].currentSrc);
				imgObj[i].onclick = function(){
					let nowImgUrl = this.getAttribute("src");
					WeixinJSBridge.invoke("imagePreview",{
						'urls':imgs,
						'current':nowImgUrl
					})
				}
			}
		}
	}
}